#include "MainWindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QWidget(parent)
    , m_songInfo()
    , m_volInfo("Vol")
    , m_songProcess(Qt::Horizontal)
    , m_volProcess(Qt::Horizontal)
    , m_prevBtn(QString::fromUtf8("Prev"))
    , m_playPauseBtn(QString::fromUtf8("Play"))
    , m_nextBtn(QString::fromUtf8("Next"))
    , m_playModeBtn(QString::fromUtf8("PlayMode"))
    , m_openlyric(QString::fromUtf8("歌词"))
    , m_openBalancer(QString::fromUtf8("均衡器"))
    , m_mainLyt(this)
    , m_otherCtrlLyt()
    , m_playCtrlLyt()
    , m_playlist()
{
    initView();
}

void MainWindow::initView()
{
    initButtons();
    m_volProcess.setRange(0, 30);
    m_volProcess.setTickInterval(1);
    m_volProcess.setTickPosition(QSlider::TicksBelow);
    m_volProcess.setInvertedAppearance(false);
    m_mainLyt.addWidget(&m_songInfo);
    m_mainLyt.addWidget(&m_songProcess);
    m_mainLyt.addLayout(&m_playCtrlLyt);
    m_mainLyt.addLayout(&m_otherCtrlLyt);
    m_mainLyt.addWidget(&m_playlist);
    initConnects();
}

void MainWindow::initButtons()
{
    m_playCtrlLyt.addWidget(&m_prevBtn);
    m_playCtrlLyt.addWidget(&m_playPauseBtn);
    m_playCtrlLyt.addWidget(&m_nextBtn);
    m_playCtrlLyt.addWidget(&m_playModeBtn);
    m_otherCtrlLyt.addWidget(&m_volInfo);
    m_otherCtrlLyt.addWidget(&m_volProcess);
    m_otherCtrlLyt.addWidget(&m_openlyric);
    m_otherCtrlLyt.addWidget(&m_openBalancer);
}

void MainWindow::initConnects()
{

}
